package com.ienglish.controller;

import com.ienglish.service.DubboService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {
//    使用 @Reference从注册中心调用服务
    @Reference
    DubboService dubboService;

    @RequestMapping("/test")
    @ResponseBody
    public String test(){
        return dubboService.helloDubbo();
    }
}
